<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    <ui:composition template="/resources/templates/install.xhtml">
        <ui:define name="title">Configuration serveur du Pare-Feu</ui:define>
        <ui:define name="content">
            <p:panel id="installPanel" header="Configuration du serveur du Pare-Feu">
                <h:form id="formConfig">
                    <p:fieldset legend="SSH">
                        <p:panelGrid columns="2">
                            <h:outputText id="ip" value="#{configurationBean.firewallIP.cle}"/><p:inputText required="true" value="#{configurationBean.firewallIP.valeur}"/>
                            <h:outputText id="user" value="#{configurationBean.firewallUser.cle}"/><p:inputText required="true" value="#{configurationBean.firewallUser.valeur}"/>
                            <h:outputText id="pass" value="#{configurationBean.firewallPassword.cle}"/><p:inputText required="true" value="#{configurationBean.firewallPassword.valeur}"/>
                        </p:panelGrid>
                    </p:fieldset>
                    <p:fieldset legend="Autres">
                        <p:panelGrid columns="2">
                            <h:outputText id="pathrules" value="#{configurationBean.firewallPathRules.cle}"/><p:inputText required="true" value="#{configurationBean.firewallPathRules.valeur}"/>
                        </p:panelGrid>
                    </p:fieldset>
                    <br/>
                    <p:panelGrid columns="3">
                        <h:outputText value="Status : " />
                        <h:outputText id="status_text" style="color:#{clientSSHBean.statusFireWall.color}" value="#{clientSSHBean.statusFireWall.message}" />
                        <p:commandButton id="thisbutton" update="status_text,thisbutton" value="Test de connexion" disabled="#{clientSSHBean.statusFireWall.id eq 0}" actionListener="#{configurationBean.testFirewallConnection()}" />
                    </p:panelGrid>
                    <br/>
                    <p:poll update="status_text" />
                    <p:tooltip value="#{configurationBean.firewallIP.help}" for="ip"/>
                    <p:tooltip value="#{configurationBean.firewallUser.help}" for="user"/>
                    <p:tooltip value="#{configurationBean.firewallPassword.help}" for="pass"/>
                    <p:tooltip value="#{configurationBean.firewallPathRules.help}" for="pathrules"/>
                </h:form>
                <h:form id="nextForm">
                    <p:toolbar>
                        <f:facet name="right">
                            <p:commandButton actionListener="#{configurationBean.saveFirewallConf()}" ajax="false" value="Suivant" iconPos="right" icon="ui-icon-arrowthick-1-e"/>
                        </f:facet>
                    </p:toolbar>
                </h:form>
            </p:panel>
        </ui:define>
        <ui:define name="dialogs">
            
        </ui:define>
    </ui:composition>
</html>
